﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Com.Web.coffinegurunaru.AppLogic.Page;

using Com.Framework.Data;
using Com.Library.DB.Recruit;
using Com.Library.Page;



namespace Com.Web.coffinegurunaru.manager.recruit
{
	public partial class recruitMethod : ManagerAjaxPage
	{
		public string GetInfo(int RecruitNo)
		{
			RecruitEntity info = RecruitModel.GetInfo(RecruitNo);
			string retVal = string.Empty;
			Dictionary<string, object> properties = new Dictionary<string, object>();
			properties.Add("RecruitInfo", info);
			retVal = ViewManager<recruit>.Render("/manager/recruit/recruitinfo.ascx", properties);
			return retVal;
		}

		public string[] GetList(byte Status, byte JobTime, int PageNo, byte PageSize)
		{
			ListData<RecruitEntity, OutputEntity> result = RecruitModel.GetList(Status, JobTime, PageNo, PageSize);
			string[] retVal = new string[2];
			Dictionary<string, object> properties = new Dictionary<string, object>();
			properties.Add("RecruitData", result.Record);
			retVal[0] = ViewManager<recruit>.Render("/manager/recruit/recruitList.ascx", properties);
			retVal[1] = result.Output.CntTotal.ToString();

			return retVal;
		}

		public void Modify(int RecruitNo, byte Status, string Description)
		{
			RecruitModel.Modify(RecruitNo, Status, WebCookies.ManagerName, Description);
		}

		public void Remove(int RecruitNo)
		{
			RecruitModel.Remove(RecruitNo);
		}
	}
}
